package com.example.sjly.ui.order;

import android.content.Context;

import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;

import com.example.sjly.ui.scheduling.room.TOrderIn;

//填写界面

@Database(entities ={Order.class},version = 1)

public abstract class OrderRoomDatabase extends RoomDatabase {
    private static OrderRoomDatabase instance;

    public abstract OrderDAO mDAO();

    public static OrderRoomDatabase getInstance(Context context) {
        if (instance == null) {
            instance = Room.databaseBuilder(context.getApplicationContext(), OrderRoomDatabase.class, "order.db")
                    .allowMainThreadQueries()
                    .build();
        }
        return instance;
    }

}